/*
 * @Descripttion:
 * @Author: Silence
 * @Date: 2023-08-14 08:39:13
 * @LastEditors: Silence
 * @LastEditTime: 2023-08-16 09:58:23
 */
import request from '@/utils/request'

// 区域列表
export const getRegionListApi = (params) => {
  return request.get('/vm-service/region/search', { params })
}

export const getRegionParticularsListApi = (id) => {
  return request.get(`/vm-service/region/${id}`)
}

// 新增区域
export const addRegionListApi = (data) => {
  return request.post('/vm-service/region', data)
}
// 修改区域
export const updateRegionListApi = (data) => {
  return request.put(`/vm-service/region/${data.id}`, data)
}
// 删除区域
export const deleteRegionListApi = (id) => {
  return request.delete(`/vm-service/region/${id}`)
}

// 合作商列表
export const getPartnerListApi = (params) => {
  return request.get('/user-service/partner/search', { params })
}

// 重置密码
export const updatePasswordApi = (id) => {
  return request.put(`/user-service/partner/resetPwd/${id}`)
}
// 添加合作商
export const addPartnerListApi = (data) => {
  return request.post('/user-service/partner', data)
}
// 更新合作商
export const updatePartnerListApi = (data) => {
  return request.put(`/user-service/partner/${data.id}`, data)
}
// 删除合作商
export const deletePartnerListApi = (id) => {
  return request.delete(`/user-service/partner/${id}`)
}

// 获取点位搜索列表
export const getLocationSearchListApi = (params) => {
  return request.get('/vm-service/node/search', { params })
}

// 获取点位搜索列表
export const getBusinessTypeListApi = () => {
  return request.get('/vm-service/businessType')
}

// 删除点位
export const deleteLocationSearchApi = (id) => {
  return request.delete(`/vm-service/node/${id}`)
}

// 添加点位
export const addLocationSearchApi = (data) => {
  return request.post('/vm-service/node', data)
}

// 查看点位详情
export const LookLocationSearchApi = (id) => {
  return request.get(`/vm-service/node/vmList/${id}`)
}
